|
Cytosim
PI
Cytoskeleton Simulator
|
This provides a common interface, in which translation and rotation are disabled. These features can be enabled by redefining the related functions in a derived class.
To enable translation:
To enable rotation:
To support periodic boundary conditions, foldPosition() should be defined.
Public Member Functions | |
| Movable () | |
| constructor | |
| virtual | ~Movable () |
| destructor | |
| virtual Vector | position () const |
| return the position in space of the object | |
| virtual void | setPosition (Vector const &) |
| move object to specified position More... | |
| virtual bool | translatable () const |
| true if object accepts translations (default=false) | |
| virtual void | translate (Vector const &) |
| move the object ( position += given vector ) More... | |
| virtual bool | rotatable () const |
| true if object accepts rotations (default=false) | |
| virtual void | rotate (Rotation const &) |
| rotate the object around the origin of coordinates More... | |
| virtual void | rotateP (Rotation const &) |
| rotate the object around its current position More... | |
| virtual void | foldPosition (Modulo const *) |
| perform modulo for periodic boundary conditions More... | |
Static Public Member Functions | |
| static Vector | readPrimitive (std::istream &, const Space *) |
| read a position specified with primitives, such as 'circle 5', etc. More... | |
| static Vector | readPosition (std::istream &, const Space *) |
| read a position in space More... | |
| static Vector | readDirection (std::istream &, const Vector &, const Space *) |
| read an orientation, and return a normalized vector More... | |
| static Rotation | readRotation (std::istream &, const Vector &, const Space *) |
| read a rotation specified in is, at position pos More... | |
|
inlinevirtual |
The initial orientation of objects is defined by specifying a rotation.
A rotation can be specified in various ways:
| Keyword | Rotation / Result |
|---|---|
random | A rotation selected uniformly among all possible rotations |
identity | The object is not rotated |
X Y Z | A random rotation transforming (1,0,0) into (X,Y,Z) |
horizontal aligned_X | A rotation where (1,0,0) is invariant or transformed into (-1,0,0) |
verticalaligned_Y | A rotation that transforms (1,0,0) into (0,1,0) or (0,-1,0) |
aligned_Z | A rotation that transforms (1,0,0) into (0,0,1) or (0,0,-1) |
aligned_XYaligned_XZaligned_YZ | A rotation that transforms (1,0,0) into a unit vector in the specified plane |
angle A B C | As specified by 3 Euler angles in radians (in 2D, only A is needed) |
degree A B C | As specified by 3 Euler angles in degrees (in 2D, only A is needed) |
quat q0 q1 q2 q3 | As specified by the Quaternion (q0, q1, q2, q3) |
If a Space is defined, one may also use:
| Keyword | Rotation / Result |
|---|---|
tangent | perpendicular to the normal of the Space |
radial | normal to the Space |
centrifuge | normal to the Space, directed outward |
centripete | normal to the Space, directed inward |
Note: when the rotation is not uniquely determined in 3D (eg. horizontal), cytosim will pick uniformly among all the possible rotations that fulfill the requirements.
A position is defined with a SHAPE followed by a number of transformations.
| Operation | Transformation |
|---|---|
at X Y Z | Translate by specified vector (X,Y,Z) |
add SHAPE | Translate by a vector chosen according to SHAPE |
align VECTOR | Rotate to align parallel with specified vector |
turn ROTATION | Apply specified rotation |
blur REAL | Add centered Gaussian noise of variance REAL |
A vector is set according to SHAPE, and the transformations are applied one after the other, in the order in which they were given.
Examples:
Geometrical Primitives:
| Keyword | Position (X, Y, Z) / Remark |
|---|---|
A B C | The specified vector (A,B,C) X=A, Y=B, Z=C |
inside | A random position inside the current Space |
edge E | At distance E from the edge of the current Space |
surface E | On the surface of the current Space The point is generated by projecting a point at distance E from the surface. |
sphere R T | A distance R +/- T/2 from the originR-T/2 < norm(X,Y,Z) < R+T/2 |
ball R | At distance R at most from the originnorm(X,Y,Z) < R |
disc R T | in 2D, a disc in the XY-plane in 3D, a disc in the XY-plane of thickness T in Z |
circle R T | A circle of radius R and thickness T At distance T from the circle of radius R |
cylinder T R | Cylinder of axis X, R=radius in YZ and T=thickness in X |
ellipse A B C | Inside the ellipse or ellipsoid of main axes 2A, 2B and 2C |
arc L Theta | A piece of circle of length L and covering an angle Theta |
stripe L R | Random Vector with L < X < R |
square R | Random Vector with -R < X < R; -R < Y < R; -R < Z < R; |
rectangle A B C | Random Vector with -A < X < A; -B < Y < B; -C < Z < C; |
gradient S E | Provides a linear density gradient, from 0 at X=S to 1 at X=E |
The primitive describe a certain area in Space. Except when specified (gradient), the returned position is chosen following a random distribution inside the area.
A contribution from Beat Rupp
The initial orientation of objects is defined by specifying a rotation.
A rotation can be specified in various ways:
| Keyword | Rotation / Result |
|---|---|
random | A rotation selected uniformly among all possible rotations |
identity | The object is not rotated |
X Y Z | A random rotation transforming (1,0,0) into (X,Y,Z) |
horizontal aligned_X | A rotation where (1,0,0) is invariant or transformed into (-1,0,0) |
verticalaligned_Y | A rotation that transforms (1,0,0) into (0,1,0) or (0,-1,0) |
aligned_Z | A rotation that transforms (1,0,0) into (0,0,1) or (0,0,-1) |
aligned_XYaligned_XZaligned_YZ | A rotation that transforms (1,0,0) into a unit vector in the specified plane |
angle A B C | As specified by 3 Euler angles in radians (in 2D, only A is needed) |
degree A B C | As specified by 3 Euler angles in degrees (in 2D, only A is needed) |
quat q0 q1 q2 q3 | As specified by the Quaternion (q0, q1, q2, q3) |
If a Space is defined, one may also use:
| Keyword | Rotation / Result |
|---|---|
tangent | perpendicular to the normal of the Space |
radial | normal to the Space |
centrifuge | normal to the Space, directed outward |
centripete | normal to the Space, directed inward |
Note: when the rotation is not uniquely determined in 3D (eg. horizontal), cytosim will pick uniformly among all the possible rotations that fulfill the requirements.
|
virtual |
|
virtual |
|
virtual |